import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/main'
        },
        {
            path: '/main',
            component: resolve => require(['../components/website/main.vue'], resolve),
            meta: { title: '系统首页' }
        },
        {
            path: '/ContentShow/:sid/:aid/',
            component: resolve => require(['../components/website/content_show.vue'], resolve),
            meta: { title: '对比内容显示' }
        },
        {
            path: '/ContentEdit/:sid/:aid/',
            component: resolve => require(['../components/website/content_edit.vue'], resolve),
            meta: { title: '对比内容编辑' }
        },
        {
            path: '/subjectlist',
            component: resolve => require(['../components/website/subjectlist.vue'], resolve),
            meta: { title: '主题列表' }
        },
        {
            path: '/step1/',
            component: resolve => require(['../components/website/step1_subject.vue'], resolve),
            meta: { title: '数据新增-步骤一' }
        },
        {
            path: '/step1/:sid/',
            component: resolve => require(['../components/website/step1_subject.vue'], resolve),
            meta: { title: '数据编辑-步骤一' }
        },
        {
            path: '/step2/:sid/',
            component: resolve => require(['../components/website/step2_project.vue'], resolve),
            meta: { title: '数据新增-步骤二' }
        },
        {
            path: '/step3/:sid/',
            component: resolve => require(['../components/website/step3_attribute.vue'], resolve),
            meta: { title: '数据新增-步骤三' }
        },
        {
            path: '/about',
            component: resolve => require(['../components/website/about.vue'], resolve)
        },
        {
            path: '/search',
            component: resolve => require(['../components/website/search.vue'], resolve)
        },
        {
            path: '/update',
            component: resolve => require(['../components/website/updatereadme.vue'], resolve)
        },
        {
            path: '/login',
            component: resolve => require(['../components/website/login.vue'], resolve)
        }
    ]
})
